home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / cw_loadstate.pro < prev    next >
Text File  |  1997-07-08  |  1KB  |  41 lines

  1. ; $Id: cw_loadstate.pro,v 1.3 1997/01/15 04:02:19 ali Exp $
  2. ;
  3. ; Copyright (c) 1992-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;+
  6. ; NAME:
  7. ;    CW_LOADSTATE
  8. ;
  9. ; PURPOSE:
  10. ;      --------------------------------------------------------------
  11. ;      | This is an obsolete routine. New applications should       |
  12. ;      | be written to use the NO_COPY keyword to WIDGET_CONTROL to |
  13. ;      | efficiently maintain widget state in a UVALUE.)            |
  14. ;      --------------------------------------------------------------
  15. ;
  16. ;    See the description of CW_SAVESTATE.
  17. ;
  18. ; CATEGORY:
  19. ;    Compound widgets.
  20. ;
  21. ; MODIFICATION HISTORY:
  22. ;    AB, June 1992
  23. ;-
  24.  
  25.  
  26. pro CW_LOADSTATE, base, state_base, state_stash, state
  27.  
  28.   if (base ne state_base) then begin
  29.     ; Preserve the existing state before replacing it
  30.     if ((n_elements(state_base) ne 0) and $
  31.         (WIDGET_INFO(state_base, /VALID) ne 0)) then $
  32.       WIDGET_CONTROL, state_stash, SET_UVALUE=state
  33.  
  34.     ; Recover the new state
  35.     state_base = base
  36.     state_stash = widget_info(state_base, /child)
  37.     WIDGET_CONTROL, state_stash, GET_UVALUE = state
  38.   endif
  39.  
  40. end
  41.